import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JTextField;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;


public class Pract2 {

	private JFrame Principal;
	private JTextField text1;
	private JTextField text2;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					Pract2 window = new Pract2();
					window.Principal.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the application.
	 */
	public Pract2() {
		initialize();
	}

	/**
	 * Initialize the contents of the frame.
	 */
	private void initialize() {
		Principal = new JFrame();
		Principal.setTitle("Ingreso");
		Principal.setBounds(100, 100, 361, 153);
		Principal.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		Principal.getContentPane().setLayout(null);
		Principal.setLocationRelativeTo(null);
		
		JLabel lblUsuario = new JLabel("Usuario");
		lblUsuario.setBounds(38, 12, 115, 15);
		Principal.getContentPane().add(lblUsuario);
		
		JLabel lblContrasea = new JLabel("Contraseña");
		lblContrasea.setBounds(38, 39, 115, 15);
		Principal.getContentPane().add(lblContrasea);
		
		text1 = new JTextField();
		text1.setBounds(154, 12, 114, 19);
		Principal.getContentPane().add(text1);
		text1.setColumns(10);
		
		text2 = new JTextField();
		text2.setBounds(154, 39, 114, 19);
		Principal.getContentPane().add(text2);
		text2.setColumns(10);
		
		JButton btnAceptar = new JButton("Aceptar");
		btnAceptar.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				
			}
		});
		btnAceptar.setBounds(96, 70, 117, 25);
		Principal.getContentPane().add(btnAceptar);
		
		
		JButton btnCancelar = new JButton("Cancelar");
		btnCancelar.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				// cierra la ventana
				System.exit(0);
		
			}
		});
		btnCancelar.setBounds(230, 70, 117, 25);
		Principal.getContentPane().add(btnCancelar);
	}
}
